﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Microhard.FMCG.VerFakeCodeGenerator
{
    public partial class MainForm : Form
    {
        int numImage = 0;
        string codepath = "";
        TwoCodeForm form1 = new TwoCodeForm();
        LabelForm form2 = null;

        public MainForm()
        {
            InitializeComponent();
            form1.FormClosing+=new FormClosingEventHandler(form1_FormClosing);
        }

        //生成二维码图片
        private void button1_Click(object sender, EventArgs e)
        {
               form1.ShowDialog();
        }

       
        private void form1_FormClosing(object sender,EventArgs e)
        {
            numImage = form1.numImage;
            codepath = form1.savePath;
        }

        //生成标签
        private void button2_Click(object sender, EventArgs e)
        {
            form2 = new LabelForm(codepath,numImage);
            form2.ShowDialog();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            form1.CloseTask();
            form2.CloseTask();
            this.Close();
            this.Dispose();
        }
    }
}
